package slhs.tempo.pivotTableUtilities;

import java.io.Serializable;

import org.openswing.swing.pivottable.aggregators.java.GenericAggregator;

/**
 * Short way to club all subjects together, regardless of their names
 * 
 * @author Mauro Carniel
 * @version 1.0
 */
public class CategoryAggregator extends GenericAggregator implements Serializable {
    private String analysisType;

    public CategoryAggregator(String analysisType) {
	this.analysisType = analysisType;
    }

    @Override
    public Object decodeValue(Object value) {
	return analysisType;
    }

    @Override
    public final boolean equals(Object obj) {
	return obj.getClass() == CategoryAggregator.class;
    }

    @Override
    public final int hashCode() {
	return CategoryAggregator.class.hashCode();
    }

}
